import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
export const constantRouterMap = [{
        path: '/',
        name: 'login',
        component: () =>
            import ('@/views/login'),
        hidden: true
    },
    {
        "path": "/service",
        "name": "service",
        "title": "模块选择",
        "component": () =>
            import ("@/views/service")
    },
    {
        "path": "/kanban",
        "name": "kanban",
        "title": "大屏看板",
        "component": () =>
            import ("@/views/kanban")
    },
    {
        path: '/main',
        component: () =>
            import ('@/views/main'),
        redirect: '/home',
        title: "首页",
        name: 'home',
        hidden: true,
        children: [{
                "path": "/home",
                "name": "home",
                "title": "首页",
                "component": () =>
                    import ("@/views/home")
            },
            {
                "path": "/companyManagement",
                "title": "公司管理",
                "name": "companyManagement",
                "component": () =>
                    import ("@/views/companyManagement")
            },
            {
                "path": "/thirdCustomerManagement",
                "title": "三方用户管理",
                "name": "thirdCustomerManagement",
                "component": () =>
                    import ("@/views/thirdCustomerManagement")
            },
            {
                "path": "/privateSecretManagement",
                "title": "认证管理",
                "name": "privateSecretManagement",
                "component": () =>
                    import ("@/views/privateSecretManagement")
            },
            {
                "path": "/apiRequestLogManagement",
                "title": "请求日志管理",
                "name": "apiRequestLogManagement",
                "component": () =>
                    import ("@/views/apiRequestLogManagement")
            },
            {
                "path": "/loginLogManagement",
                "title": "登录日志管理",
                "name": "loginLogManagement",
                "component": () =>
                    import ("@/views/loginLogManagement")
            },
            {
                "path": "/userManagement",
                "title": "用户管理",
                "name": "userManagement",
                "component": () =>
                    import ("@/views/userManagement")
            },
            {
                "path": "/roleManagement",
                "title": "角色管理",
                "name": "roleManagement",
                "component": () =>
                    import ("@/views/roleManagement")
            },
            {
                "path": "/menuManagement",
                "title": "菜单管理",
                "name": "menuManagement",
                "component": () =>
                    import ("@/views/menuManagement")
            },
            {
                "path": "/equipmentManagement",
                "title": "设备管理",
                "name": "equipmentManagement",
                "component": () =>
                    import ("@/views/equipmentManagement")
            },
            {
                "path": "/simManagement",
                "title": "sim卡管理",
                "name": "simManagement",
                "component": () =>
                    import ("@/views/simManagement")
            },
            {
                "path": "/userEquipment",
                "title": "用户设备管理",
                "name": "userEquipment",
                "component": () =>
                    import ("@/views/userEquipment")
            },
            {
                "path": "/paramsManagement",
                "title": "参数管理",
                "name": "paramsManagement",
                "component": () =>
                    import ("@/views/paramsManagement")
            },
            {
                "path": "/equipmentOption",
                "title": "设备控制",
                "name": "equipmentOption",
                "component": () =>
                    import ("@/views/equipmentOptionV4")
                    // import ("@/views/equipmentOptionV3")
                    // import ("@/views/equipmentOption")
            },
            {
                "path": "/customerManagement",
                "title": "客户管理",
                "name": "customerManagement",
                "component": () =>
                    import ("@/views/customerManagement")
            },
            {
                "path": "/equipmentMaintenance",
                "title": "设备运维",
                "name": "equipmentMaintenance",
                "component": () =>
                    import ("@/views/equipmentMaintenance")
            },
            {
                "path": "/equipmentModelManagement",
                "title": "设备型号管理",
                "name": "equipmentModelManagement",
                "component": () =>
                    import ("@/views/equipmentModelManagement")
            },
            {
                "path": "/userEquipmentOption",
                "title": "用户设备控制",
                "name": "userEquipmentOption",
                "component": () =>
                    import ("@/views/userEquipmentOption")
            }, {
                "path": "/userEquipmentOptionOne",
                "title": "用户设备控制_单次",
                "name": "userEquipmentOptionOne",
                "component": () =>
                    import ("@/views/userEquipmentOptionOne")
            },
            {
                "path": "/dataManagement",
                "title": "数据管理",
                "name": "dataManagement",
                "meta": {
                    "remember": true
                },
                "component": () =>
                    import ("@/views/dataManagement")
            },
            {
                "path": "/mobileDataManagement",
                "title": "便携式原始数据",
                "name": "mobileDataManagement",
                "component": () =>
                    import ("@/views/mobileDataManagement")
            },
            {
                "path": "/dataWatch",
                "title": "查看数据",
                "name": "dataWatch",
                "meta": {
                    'remember': true
                },
                "component": () =>
                    import ("@/views/dataWatch")
            },
            {
                "path": "/algorithmManagement",
                "title": "算法管理",
                "name": "algorithmManagement",
                "component": () =>
                    import ("@/views/algorithmManagement")
            }, {
                "path": "/dataEntry",
                "title": "数据录入",
                "name": "dataEntry",
                "component": () =>
                    import ("@/views/dataEntry")
            }, {
                "path": "/dataEntryMan",
                "title": "数据录入",
                "name": "dataEntryMan",
                "component": () =>
                    import ("@/views/dataEntryMan")
            }, {
                "path": "/modelOptimization",
                "title": "模型优化",
                "name": "modelOptimization",
                "component": () =>
                    import ("@/views/modelOptimization")
            }, {
                "path": "/modelComment",
                "title": "模型评价",
                "name": "modelComment",
                "component": () =>
                    import ("@/views/modelComment")
            }, {
                "path": "/organization",
                "title": "组织结构",
                "name": "organization",
                "component": () =>
                    import ("@/views/organization")
            }, {
                "path": "/alarmManagement",
                "title": "报警管理",
                "name": "alarmManagement",
                "component": () =>
                    import ("@/views/alarmManagement")
            }, {
                "path": "/repairTask",
                "title": "维修任务单",
                "name": "repairTask",
                "component": () =>
                    import ("@/views/repairTask")
            }, {
                "path": "/repairRecords",
                "title": "维修记录",
                "name": "repairRecords",
                "component": () =>
                    import ("@/views/repairRecords")
            }, {
                "path": "/alarmRepairKanban",
                "title": "云运维管理看板",
                "name": "alarmRepairKanban",
                "component": () =>
                    import ("@/views/alarmRepairKanban")
            }, {
                "path": "/dataManagement_copy",
                "title": "新原始数据",
                "name": "dataManagement_copy",
                "meta": {
                    "remember": true
                },
                "component": () =>
                    import ("@/views/dataManagement_copy")
            }, {
                "path": "/dataConfigure",
                "title": "参数配置",
                "name": "dataConfigure",
                "component": () =>
                    import ("@/views/dataConfigure")
            }, {
                "path": "/cpuMonitor",
                "title": "CPU监控",
                "name": "cpuMonitor",
                "component": () =>
                    import ("@/views/cpuMonitor")
            }, {
                "path": "/systemDeviceMigration",
                "title": "设备环境配置",
                "name": "systemDeviceMigration",
                "component": () =>
                    import ("@/views/systemDeviceMigration")
            }, {
                "path": "/paramConfig",
                "title": "模型参数配置",
                "name": "paramConfig",
                "component": () =>
                    import ("@/views/paramConfig")
            }, {
                "path": "/personalCenter",
                "title": "个人中心",
                "name": "personalCenter",
                "component": () =>
                    import ("@/views/personalCenter")
            }, {
                "path": "/pointManagement",
                "title": "点位管理",
                "name": "pointManagement",
                "component": () =>
                    import ("@/views/pointManagement")
            }, {
                "path": "/pointDataWatch",
                "title": "点位指标数据",
                "name": "pointDataWatch",
                "meta": {
                    "remember": true
                },
                "component": () =>
                    import ("@/views/pointDataWatch")
            }, {
                "path": "/reportMeanStatistical",
                "title": "均值统计报表",
                "name": "reportMeanStatistical",
                "meta": {
                    "remember": true
                },
                "component": () =>
                    import ("@/views/reportMeanStatistical")
            }, {
                "path": "/reportParamsStatistical",
                "title": "指标统计报表",
                "name": "reportParamsStatistical",
                "meta": {
                    "remember": true
                },
                "component": () =>
                    import ("@/views/reportParamsStatistical")
            }, {
                "path": "/equipmentCalibration",
                "title": "设备定标",
                "name": "equipmentCalibration",
                "component": () =>
                    import ("@/views/equipmentCalibration")
            }, {
                "path": "/domainsManagement",
                "title": "配置管理",
                "name": "domainsManagement",
                "component": () =>
                    import ("@/views/domainsManagement")
            }, {
                "path": "/pushManagement",
                "title": "推送管理",
                "name": "pushManagement",
                "component": () =>
                    import ("@/views/pushManagement")
            }, {
                "path": "/equipmentCommunication",
                "title": "设备调试",
                "name": "equipmentCommunication",
                "component": () =>
                    import ("@/views/equipmentCommunication")
            }, {
                "path": "/modelCalibration",
                "title": "模型校准",
                "name": "modelCalibration",
                "component": () =>
                    import ("@/views/modelCalibration")
            }

            // ...otherModulesRouter
        ]
    }
]
export default new Router({
    // mode: 'history', // require service support
    scrollBehavior: () => ({ y: 0 }),
    routes: constantRouterMap
})